//
//  CourseTitleHeaderView.m
//  ShowYork
//
//  Created by hxh on 2020/9/2.
//  Copyright © 2020 hxh. All rights reserved.
//

#import "LessonTitleHeaderView.h"

@interface LessonTitleHeaderView ()
@property (nonatomic,strong)UILabel *titleLb;
@property (nonatomic,copy)NSString *titleName;
@property (nonatomic,strong)UIView *line;
@end

@implementation LessonTitleHeaderView
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setUI];
    }
    return self;
}
- (void)setUI{
     self.backgroundColor = [UIColor whiteColor];
        
    self.titleLb = [[UILabel alloc]init];
    self.titleLb.font = [UIFont boldSystemFontOfSize:18];
    self.titleLb.textColor = RGBA(35, 24, 21, 1);
    self.titleLb.text = self.titleName;
    [self addSubview:self.titleLb];
       
    [self.titleLb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self).offset(24);
        make.left.equalTo(self).offset(16);
    }];
    
    self.line = [[UIView alloc]init];
    self.line.backgroundColor = RGBA(248, 248, 248, 1);
    [self addSubview:self.line];
    [self.line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.right.equalTo(self);
        make.height.mas_equalTo(8);
    }];
    
}
- (void)setHeaderTitle:(NSString *)headerTitle{
    self.titleLb.text = headerTitle;
}
@end
